package org.csmzxy.class2333.innerclass;

public class DeviceController {
    private String controllerName;
    public DeviceController(String controllerName) {
        this.controllerName = controllerName;
    }
    public void connectToDevice() {
        System.out.println("设备控制器成功连接到设备");
    }
    class Device{
        private final String deiceNAme;
        public Device(String deiceNAme) {
            this.deiceNAme = deiceNAme;
        }
        public void powerOn() {
            System.out.println(controllerName + "控制" + deiceNAme + "开机！");
        }
        public void powerOff() {
            System.out.println(controllerName + "控制" + deiceNAme + "关机！");
        }
    }
}
